import React,{ Fragment } from 'react';
import { Layout , Menu ,Icon } from 'antd';
import Logo from '@/components/Logo/Logo';
import {Swtich, Route, Router, HashHistory, Link} from 'react-router-dom';


class SiderMenu extends React.PureComponent {

    constructor(props){
        super(props);
    }

    render(){

        const SubMenu = Menu.SubMenu;
        const { Sider } = Layout;
        const { collapsed } = this.props;

        return (
          <Fragment>
              <Sider collapsed={collapsed}>
                <Logo />
                <Menu theme="dark" defaultSelectedKeys={['1']} mode="inline">
                <Menu.Item key="1">
                    <Icon type="pie-chart" />
                    <span>home</span>
                    <Link to={`/home`} style={{ display: 'inline' }}><span className="nav-text">home</span></Link>
                </Menu.Item>
                <Menu.Item key="2">
                    <Icon type="desktop" />
                    <span>Option 2</span>
                </Menu.Item>
                <SubMenu
                    key="sub1"
                    title={<span><Icon type="user" /><span>User</span></span>}
                >
                    <Menu.Item key="login"> <Link to={`/login`} style={{ display: 'inline' }}><span className="nav-text">login</span></Link></Menu.Item>
                    <Menu.Item key="4">Bill</Menu.Item>
                    <Menu.Item key="5">Alex</Menu.Item>
                    <Menu.Item key="6">Tom</Menu.Item>
                    <Menu.Item key="7">Bill</Menu.Item>
                    <Menu.Item key="8">Alex</Menu.Item>
                    <Menu.Item key="9">Tom</Menu.Item>
                    <Menu.Item key="10">Bill</Menu.Item>
                    <Menu.Item key="11">Alex</Menu.Item>
                </SubMenu>
                <SubMenu
                    key="sub2"
                    title={<span><Icon type="team" /><span>Team</span></span>}
                >
                    <Menu.Item key="12">Team 1</Menu.Item>
                    <Menu.Item key="13">Team 2</Menu.Item>
                </SubMenu>
                <Menu.Item key="14">
                    <Icon type="file" />
                    <span>File</span>
                </Menu.Item>
                </Menu>
            </Sider>
          </Fragment>
        );

    }

}

export default SiderMenu;